package com.leo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Value("${spring.cloud.client.hostname}")
    String host;

    @Value("${server.port}")
    int port;

    @GetMapping("hello")
    public String hello(String name) {
        return host + ":" + port + " hello " + name + "!";
    }

}
